package com.leanote.berial.tingphone.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 通用的FragmentPagerAdapter
 * <p/>
 * Created by berial on 15/7/28.
 */
public class CommonFragmentPagerAdapter extends FragmentPagerAdapter {
	private List<Fragment> fragments;

	public CommonFragmentPagerAdapter(FragmentManager fm,List<Fragment> fragments) {
		super(fm);
		this.fragments=fragments;
	}


	@Override
	public Fragment getItem(int i) {
		return fragments.get(i);
	}

	@Override
	public int getCount() {
		return fragments.size();
	}
}
